package com.jial08.designpatterns.factory.simple.impl;

import com.jial08.designpatterns.factory.simple.Operation;

/**
 * <p>类描述：除。</p>
 *
 * @author jl
 * @version v1.0.0.1。
 * @since JDK1.8。
 * <p>创建日期：2019/10/11 下午7:41。</p>
 */
public class Div implements Operation {
	@Override
	public double getResult(double numberA, double numberB) throws Exception {
		if (numberB == 0) {
			throw new Exception("除数不能为0");
		}
		return numberA / numberB;
	}
}
